package flexo.scene;

public abstract class Entity
{
	public enum Type
	{
		GRAPHIC,
		SOUND,
		INPUT,
		PHYSIC,
		OTHER
	}
	
	protected Type type;
	
	public Entity(Type type)
	{
		this.type = type;
	}
	
	public Type getType()
	{
		return type;
	}
	
	public boolean attachTo(Node n)
	{
		return n.getScene().addEntity(n, this);
	}
	
	public void deattachFrom(Node n)
	{
		n.getScene().removeEntity(n, this);
	}
}
